<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>Web GavaScript IDE</title>
    <!-- CodeMirror -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/dracula.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/javascript/javascript.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
    <link rel="stylesheet" href="style.css">
    <script src="event.js"></script>
</head>

<body>
    <!-- 新增标题栏 -->
    <div id="title-bar">
        <div class="title" onclick="window.location.href='http://.gavascript.top/'">Web GavaScript IDE</div>
        <div class="menu">
            <div class="menu-item dropdown">
                <span>文件</span>
                <div class="dropdown-content">
                    <div onclick="openFile()">打开</div>
                    <div onclick="saveFile()">保存</div>
                </div>
            </div>
            <div class="menu-item dropdown">
                <span>帮助</span>
                <div class="dropdown-content">
                    <div onclick="Swal.fire('贡献人员', '开发:Hinincs Inventocode 部署:Inventocode', '')">贡献人员</div>
                    <div onclick="Swal.fire({title: '关于', html: 'v0.3<br>新增标题栏<br>v0.2<br>移除了him<br>v0.1<br>项目立项'})">关于</div>
                </div>
            </div>
        </div>
        <div class="file-name-box">
            <input type="text" placeholder="文件名" id="file-name-input" value="hello_world">
        </div>
    </div>
    <!-- 全屏编辑器容器 -->
    <div id="editor-wrapper">
        <div id="editor-container"></div>
        <button id="run-btn" onclick="run_code()">▶</button>
    </div>

    <!-- 可折叠控制台 -->
    <div id="console-wrapper">
        <div id="console-header">
            控制台
        </div>
        <div id="console-output"></div>
    </div>
    <!-- 文件输入元素（隐藏） -->
    <input type="file" id="file-input" accept=".gs" style="display: none;" onchange="loadFile(event)">

    <script src="./script.js"></script>
</body>

</html>